package cn.edu.hit.graphdata;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

@SpringBootApplication
public class GraphDataTransportApplication {

    public static void main(String[] args) throws IOException {
//		GraphData.setProvider(new Neo4jDataProvider());
        FaultPortMapping mapping = FaultPortMapping.getInstance();
        String inputData = Files.lines(Paths.get("./fp-mapping.json")).reduce((a, b) -> a + b).get();
        mapping.loadFromJson(inputData);
        SpringApplication.run(GraphDataTransportApplication.class, args);
    }
}
